<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:fo="http://www.w3.org/1999/XSL/Format" 
  xmlns:xlink="http://www.w3.org/1999/xlink" exclude-result-prefixes="xlink">
 <xsl:output method="xml" indent="yes"/>
 <xsl:template match="/">
  <fo:root>
   <fo:layout-master-set>
    <fo:simple-page-master master-name="A4" page-height="297mm" page-width="210mm" margin-top="10mm"  margin-bottom="0mm"  margin-left="20mm" margin-right="20mm">
          <fo:region-body margin-top="20mm" margin-bottom="20mm" margin-left="0mm" margin-right="0mm"/>
          <fo:region-before	region-name="xsl-region-before" extent="10mm"/>
          <fo:region-after region-name="xsl-region-after" extent="10mm"/>
    </fo:simple-page-master>
   </fo:layout-master-set>

   <fo:page-sequence master-reference="A4">
    <fo:static-content flow-name="xsl-region-before">
      <fo:block font-family="Helvetica" font-size="10pt"
          text-align="center">
          <fo:inline>Liste des personnes</fo:inline>
      </fo:block>
    </fo:static-content>

    <fo:static-content flow-name="xsl-region-after">
      <fo:block font-family="Helvetica" font-size="10pt" text-align="center">
          Page - <fo:page-number />
      </fo:block>
    </fo:static-content>
    
    <fo:flow flow-name="xsl-region-body">
      <fo:block background-color="darkblue" space-after="6mm">
        <fo:inline font-size="30pt" color="white">Personnes</fo:inline>
      </fo:block>
      <fo:block>
       <xsl:apply-templates select="Personnes"/>
      </fo:block>
    </fo:flow>
    
   </fo:page-sequence>
  </fo:root>
 </xsl:template>

  <xsl:template match="Personnes">
    <fo:block>
      <xsl:apply-templates select="Personne">
        <xsl:sort select="Nom"/>
      </xsl:apply-templates>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="Personne">
    
    <fo:block>
      <fo:inline><xsl:value-of select="Nom"/><xsl:text> </xsl:text><xsl:value-of select="Prenom"/></fo:inline>
    </fo:block>
  </xsl:template>
 
</xsl:stylesheet>

